package com.letfox.finance.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.letfox.finance.dao.AccountDao;
import com.letfox.finance.model.FINAccount;
import com.letfox.finance.service.AccountService;

@Service
public class AccountServiceImpl implements AccountService {
	@Autowired
	private AccountDao accountcDao;


	@Override
	public int deleteById(String finAccountId) {
		
		return accountcDao.deleteByPrimaryKey(finAccountId);
	}

	@Override
	public int save(FINAccount finAccount) {
		
		return accountcDao.insertSelective(finAccount);
	}

	/**
	 * 查询账户信息
	 */
	@Override
	public FINAccount selectById(String finAccountId) {
		
		return accountcDao.selectByPrimaryKey(finAccountId);
	}

	@Override
	public int update(FINAccount finAccount) {
		
		return accountcDao.updateByPrimaryKeySelective(finAccount);
	}


}
